package edu.sctu.practice.class02.lvchang.assign05.test2;

/**
 * Created by socul on 2015/12/10.
 */
public class Sort3 {

    double max1, max2, max3;

    Sort3() {
        max1 = -1;
        max2 = -1;
        max3 = -1;
    }

    void sort() {
        double s;
        if (max1 < max2) {
            s = max1;
            max1 = max2;
            max2 = s;
        }
        if (max1 < max3) {
            s = max1;
            max1 = max3;
            max3 = s;
        }
        if (max2 < max3) {
            s = max2;
            max2 = max3;
            max3 = s;
        }
    }

}
